<template>
  <div class="form-box">
    <a-form-model class="form" :model="form" style="overflow: hidden">
      <a-row>
        <a-col :span="18">
          <a-form-model-item label="刊物名称">
            <a-input v-model="form.name" placeholder="请输入刊物名称" />
          </a-form-model-item>
        </a-col>
      </a-row>
      <a-row>
        <a-col :span="18">
          <a-form-model-item label="发布单位">
            <a-input
              v-model="form.serialNumber"
              placeholder="请输入刊物发布单位"
            />
          </a-form-model-item>
        </a-col>
      </a-row>
      <a-row>
        <a-col :span="18">
          <a-form-model-item label="状态">
            <a-radio-group v-model="form.state">
              <a-radio :value="1">启用</a-radio>
              <a-radio :value="0">禁用</a-radio>
            </a-radio-group>
          </a-form-model-item>
        </a-col>
      </a-row>
      <a-row>
        <a-col :span="18">
          <a-form-model-item label="排序">
            <a-select style="width: 60px" v-model="form.sort">
              <a-select-option v-for="i in 4" :key="i">
                {{ i }}
              </a-select-option>
            </a-select>
          </a-form-model-item>
        </a-col>
      </a-row>
      <div class="form-footer">
        <a-button type="primary" @click="onSubmit">确定</a-button>
        <a-button style="margin-left: 10px" @click="$router.back()">
          返回
        </a-button>
      </div>
    </a-form-model>
  </div>
</template>
<script>
export default {
  data() {
    return {
      choiceVisible: false, //上报人弹框
      labelCol: { span: 4 },
      wrapperCol: { span: 16 },

      form: {
        name: '',
        unit: '',
        state: 1,
        sort: 1
      }
    }
  },
  methods: {
    onSubmit() {
      console.log('submit!', this.form)
    }
  }
}
</script>
<style lang="less" scoped>
/deep/ .ant-calendar-picker-input {
  line-height: 40px;
}
.box-content {
  padding-right: 20px;
}
.form-footer {
  position: absolute;
  bottom: 10px;
  text-align: center;
  width: 100%;
}
</style>